<!DOCTYPE html>
<!--解决idea thymeleaf 表达式模板报红波浪线-->
<!--suppress ALL -->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 引入公用部分 -->
    <script th:replace="head::static"></script>
    <!-- 样式 -->
    <link th:href="@{/css/common.css}" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="layui-row layui-col-space15">
    <!-- 树 -->
    <div class="layui-col-md6">
        <div class="layui-card">
            <div class="layui-card-header">用户列表</div>
            <div class="layui-card-body">
                <!-- 表格主体 -->
                <table class="layui-hide" id="userTable" lay-filter="test"></table>
                <!-- 模板 -->
                <script type="text/html" id="userTableToolbarDemo">
                    <div class="layui-btn-container">
                        <input type="text" id="queryByUserName" name="queryByUserName" autocomplete="off"
                               placeholder="请输入用户名" class="layui-input layui-btn-sm">
                        <button class="layui-btn layui-btn-sm" lay-event="query">查询<i class="layui-icon layui-icon-search"></i></button>
                    </div>
                </script>
                <script type="text/html" id="userTableBarDemo">
                    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑<i class="layui-icon layui-icon-edit"></i></a>
                    <a class="layui-btn layui-btn-xs" lay-event="auth">授权</a>
                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除<i class="layui-icon layui-icon-close"></i></a>
                </script>
            </div>
        </div>
    </div>
    <!-- 操作表单 -->
    <div class="layui-col-md6">
        <div class="layui-card">
            <div class="layui-card-header">操作表单</div>
            <div class="layui-card-body">
                <form id="userForm" class="layui-form layui-form-pane">
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户名</label>
                        <div class="layui-input-block">
                            <input type="text" name="userName" autocomplete="off" placeholder="用户名"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">登录名</label>
                        <div class="layui-input-block">
                            <input type="text" name="loginName"  disabled="disabled"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">密码</label>
                        <div class="layui-input-block">
                            <input type="text" name="password"  autocomplete="off" placeholder="密码"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">帐号状态</label>
                        <div class="layui-input-block">
                            <input type="radio" name="status" value="0" title="正常">
                            <input type="radio" name="status" value="1" title="禁用">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户邮箱</label>
                        <div class="layui-input-block">
                            <input type="text" name="email"  autocomplete="off" placeholder="用户邮箱" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">手机号码</label>
                        <div class="layui-input-block">
                            <input type="text" name="phonenumber"  autocomplete="off" placeholder="手机号码" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户性别</label>
                        <div class="layui-input-block">
                            <input type="radio" name="gender" value="男" title="男">
                            <input type="radio" name="gender" value="女" title="女">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户头像</label>
                        <div class="layui-input-block">
                            <input type="text" name="avatar"  autocomplete="off" placeholder="用户头像" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">主题</label>
                        <div class="layui-input-block">
                            <input type="text" name="theme"  autocomplete="off" placeholder="主题" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">语言</label>
                        <div class="layui-input-block">
                            <input type="text" name="local"  autocomplete="off" placeholder="语言" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">部门ID</label>
                        <div class="layui-input-block">
                            <input type="text" name="deptId"  disabled="disabled" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <a class="layui-btn" onclick="userFormSave()">保存</a>
                        </div>
                    </div>

                    <!-- 隐藏域 -->
                    <input type="text" name="id" hidden="hidden"/>
                </form>
                <form id="userAuthorityForm" class="layui-form layui-form-pane" style="display: none;">
                <div class="layui-form-item">
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                        <legend>用户权限</legend>
                    </fieldset>
                    <div id="userAuthorityTree" class="demo-tree demo-tree-box layui-col-md6"
                         style="height: 500px; overflow: scroll;"></div>
                </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <a class="layui-btn" onclick="userAuthorityFormSave()">保存</a>
                        </div>
                    </div>
                    <input type="text" id="userid" hidden="hidden"/>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
<!-- js -->
<script th:src="@{/js/sys/user/user.js}"></script>
</html>